package com.sms.shared;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name="parsingmethod")
public class ParsingMethod implements Serializable{
	
	public ParsingMethod(){
		
	}

	@Id
	@GenericGenerator(name = "generator", strategy = "increment")
    @GeneratedValue(generator = "generator")
	@Column(name = "Id")
	private Long id;
	
	@Column(name = "name", nullable = false, length = 50)
	private String name;
	
	@Column(name = "fileType", nullable = false, length = 10)
	private String fileType;
	
	@Column(name = "delimiter", nullable = false, length = 20)
	private String delimiter;
	
	@Column(name = "isActive")
	private boolean isActive;
	
	@Column(name = "createdDate")
	private java.util.Date createdDate;
	
	@Column(name = "updatedDate")
	private java.util.Date updatedDate;
	
	@Column(name = "vendorName", nullable = false, length = 50)
	private String vendorName;
	
	@OneToMany(cascade = CascadeType.ALL,fetch=FetchType.LAZY)
	@JoinColumn(name = "parsingMethodId")
	private Set<ParsingParameter> parameters = new HashSet<ParsingParameter>();

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public boolean isActive() {
		return isActive;
	}

	public void setActive(boolean isActive) {
		this.isActive = isActive;
	}

	public java.util.Date getCreatedDate() {
		return createdDate;
	}

	public void setCreatedDate(java.util.Date createdDate) {
		this.createdDate = createdDate;
	}

	public java.util.Date getUpdatedDate() {
		return updatedDate;
	}

	public void setUpdatedDate(java.util.Date updatedDate) {
		this.updatedDate = updatedDate;
	}

	public String getVendorName() {
		return vendorName;
	}

	public void setVendorName(String vendorName) {
		this.vendorName = vendorName;
	}

	public String getFileType() {
		return fileType;
	}

	public void setFileType(String fileType) {
		this.fileType = fileType;
	}

	public String getDelimiter() {
		return delimiter;
	}

	public void setDelimiter(String delimiter) {
		this.delimiter = delimiter;
	}

	public Set<ParsingParameter> getParameters() {
		return parameters;
	}

	public void setParameters(Set<ParsingParameter> parameters) {
		this.parameters = parameters;
	}
	
	
}
